<template>
 <div>
    <el-upload class="upload-demo" :action="$baseUrl +'/files/SongUpload'"
        ref="uploadmusic"
        :file-list="fileList"
        :show-file-list="true"
        :headers="Headers"
        :on-success="handlSuccess">
   <el-button size="small" type="primary">点击上传</el-button>
</el-upload>
 </div>
</template>

<script>
export default {
  props:{
    fileList:{
      type:Array,
      default:function(){
        return []
      }
    }
  },
    data() {
      return {
        Headers:{
             token: JSON.parse(localStorage.getItem('token') || '{}')
            }
      }
    },
    methods:{
        handlSuccess(response){
            console.log(response)
            console.log(this.fileList)
            this.$emit('Sendmusic',response)
        },
        clear(){
        this.$refs.uploadmusic.clearFiles()
      }
    }
}
</script>

<style scoped>

</style>